<?php
namespace app\wap\controller;

class File extends Base{

	public function wap_edit_upload(){
		$this->user_id(true);
		$model = model('WapFile');
		$allow_ext   = $model->getAllowExt('img');
		$data = $model->wap_edit_upload($this->_user_id, $allow_ext, '');
		
		if($data){
			echo json_encode([
	    		'code' => '100',
	    		'summary' => 'success',
	    		'data' => ['url' => $data['file_url']]
			]);
		}else{
			echo json_encode([
    			'code' => '101',
    			'summary' => '上传失败' . $model->tips_info,
			]);
		}


	}
}